import { Component, OnInit } from '@angular/core'

import { DataService } from '@shared/services/data.service'
import { PageService } from '@shared/services/page.service'
import { ETabScrollStatus, EBizLevel } from '@shared/enums'
import { IBiz } from '@shared/interfaces/biz'

@Component({
  selector: 'app-terminal-detail-tab-system',
  templateUrl: './tab-system.component.html',
})
export class TerminalDetailTabSystemComponent implements OnInit {
  bizInfo: IBiz
  bizLevel: EBizLevel.Terminal

  constructor(
    private dataService: DataService,
    private pageService: PageService
  ) {}

  ngOnInit() {
    this.dataService.terminal$.value$.subscribe(terminal => {
      this.bizInfo = terminal.common
    })
    this.pageService.setTabScrollStatus(ETabScrollStatus.Scroll)
  }
}
